package com.kgc.sbt.api;

import com.kgc.sbt.domain.LimitBuy;
import com.kgc.sbt.domain.NoticeLimit;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Created on 2021/6/21.
 * <p>
 * Author: GongMingJie
 * <p>
 * Description:
 */
public interface BuyLimitApi {

    /**
     * Created on 2021/6/21
     * Author: GongMingJie
     * @param
     * @return
     * Description: 创建抢购活动,需要使用主键值，才使用对象返回数据
     */
    LimitBuy createBuyLimit(LimitBuy limitBuy);

    /**
     * Created on 2021/6/22
     * Author: GongMingJie
     * @param
     * @return
     * Description: 登记抢购活动
     */
    boolean createNoticeLimit(NoticeLimit noticeLimit);

    /**
     * Created on 2021/6/23
     * Author: GongMingJie
     * @param
     * @return
     * Description: 获取抢购活动时间
     */
    Integer getBuyLimitTime(Integer buyLimitId);

    /**
     * Created on 2021/6/23
     * Author: GongMingJie
     * @param
     * @return
     * Description: 判断用户是否登记
     */
    boolean isRegister(Integer userId,Integer buyLimitId);

    /**
     * Created on 2021/6/23
     * Author: GongMingJie
     * @param
     * @return
     * Description: 根据活动id查询活动商品id
     */
    Integer getGoodsId(Integer buyLimitId);

    /**
     * Created on 2021/6/24
     * Author: GongMingJie
     *
     * @param
     * @return Description: 获取活动开始时间
     */
    Date getBuyLimitStartTime(Integer buyLimitId);

    /**
     * Created on 2021/6/24
     * Author: GongMingJie
     *
     * @param
     * @return Description: 获取活动结束时间
     */
    Date getBuyLimitEndTime(Integer buyLimitId);

    /**
     * Created on 2021/6/25
     * Author: GongMingJie
     * @param
     * @return
     * Description: 获取抢购活动对应的价格
     */
    BigDecimal getGoodsPrice(Integer buyLimitId);
    
    /**
     * Created on 2021/6/29
     * Author: GongMingJie
     * @param 
     * @return 
     * Description: 根据id查询抢购活动
     */
    LimitBuy getLimitBuy(Integer id);
}
